package com.pug.web.banner;

import com.pug.pojo.Banner;
import com.pug.service.banner.IBannerService;
import com.pug.web.ApiBaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Description:
 * Author: taimi 37310
 * Version: 1.0
 * Create Date Time: 2022/4/7 0:36.
 * Update Date Time:
 *
 * @see
 */
@Api(tags = "轮播图管理")
@RestController
@RequiredArgsConstructor
public class BannerController extends ApiBaseController {
    private final IBannerService bannerService;

    @PostMapping("/banner/load")
    @ApiOperation(value = "查询所有的轮播图信息")
    public List<Banner> loadBanners(){
        return bannerService.list();
    }
}
